package com.frog.service.friend.utils;


import com.alibaba.fastjson.JSON;

import java.util.List;
import java.util.Objects;

public class ObjectUtils {

    // 判断两个对象是否相等
    public static boolean isEqual(Object obj1, Object obj2) {
        return Objects.equals(obj1, obj2);
    }

    // 判断对象是否为空
    public static boolean isNull(Object obj) {
        return obj == null;
    }

    // 判断对象是否非空
    public static boolean isNotNull(Object obj) {
        return obj != null;
    }

    public static boolean isNullOrEmpty(Object obj) {
        return isNull(obj) || "{}".equals(JSON.toJSONString(obj));
    }




}